class Innate_Skill_001 < Innate_Skill
  attr_accessor   :count
  def initialize(actor)
    super(actor)
    @name = '挥砍'
    @type = 1
    @energy_cost = -1
    @description = '使用斧头攻击单个目标，造成攻击力100%的伤害，每第5次使用挥砍则触发裂石飞环'
    @count = 0
    @target_mode = 1
    @icon_name = "Actor-1-s1"
  end
  def use
    super
    damge_info = make_damge_info(@actor.atk)
    actions = make_single_attack_action(0, 7, @selected_target, damge_info)
    action_flow.batch_add_actions(actions)
    @count += 1
    if @count == 5
      @count = 0
      action = Action_Bit.new(@actor, 1)
      action.set_detail(45).set_block
      actions = @actor.innate_skills[3].make_actions
      actions.unshift(action)
      action_flow.batch_add_actions(actions)
      @actor.add_popup_text(@actor.innate_skills[3].name, 1)
    end
    @actor.buff_state.add_buff(1, 1)
  end
  def next_level_description
    return "造成攻击力110%的伤害"
  end
  def on_battle_start
    @count = 0
  end
end
